wayland: always return FALSE from begin_paint
authorRay Strode <rstrode@redhat.com>
Tue, 2 Feb 2016 17:20:22 +0000 (12:20 -0500)
committerRay Strode <rstrode@redhat.com>
Sat, 6 Feb 2016 13:02:57 +0000 (08:02 -0500)
commit2c300081c4fc4db6a345041cbf4942cb99cea793
tree210774fc8585749d543429f08323aa824c412caf
parent1cfa2f41345d37c6efba30796cedf3817f396b8e
wayland: always return FALSE from begin_paint

The client and compositor share access to the window
pixel buffers. After the client hands off (commits)
the buffer to the compositor it's not supposed to write
to it again until it's released by the compositor.

The code tries to deal with this contention by allocating
a temporary buffer and using that in the mean time. This
temporary buffer is allocated by a higher layer of the code
when begin_paint returns TRUE. Unfortunately, that layer of
the code has no idea when the buffer is released, so it ends
up blitting the temporary buffer back to the shared buffer
prematurely.

This commit changes begin_paint to always return FALSE.

A future commit will address the contention problem in
a different way.

https://bugzilla.gnome.org/show_bug.cgi?id=761312
gdk/wayland/gdkdisplay-wayland.c
gdk/wayland/gdkprivate-wayland.h
gdk/wayland/gdkwindow-wayland.c